package com.tancire.arts.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.tancire.common.annotation.Excel;
import com.tancire.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 文章管理对象 note_article
 *
 * @author 陈超
 * @date 2024-09-23
 */
public class NoteArticle extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 父目录 */
    @Excel(name = "父目录")
    private Long pid;

    /** 所属作品集 */
    @Excel(name = "所属作品集")
    private Long noteId;

    /** 文章标题 */
    @Excel(name = "文章标题")
    private String artTitle;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String artContent;

    private Integer artSort;

    /** 0 正常  1 删除  真删除，字段保留 */
    private Long delFlag;

    private List<NoteArticle> children;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }

    public Long getPid() {
        return pid;
    }
    public void setNoteId(Long noteId) {
        this.noteId = noteId;
    }

    public Long getNoteId() {
        return noteId;
    }
    public void setArtTitle(String artTitle) {
        this.artTitle = artTitle;
    }

    public String getArtTitle() {
        return artTitle;
    }
    public void setArtContent(String artContent) {
        this.artContent = artContent;
    }

    public String getArtContent() {
        return artContent;
    }
    public void setDelFlag(Long delFlag) {
        this.delFlag = delFlag;
    }

    public Long getDelFlag() {
        return delFlag;
    }

    public List<NoteArticle> getChildren() {
        return children;
    }

    public void setChildren(List<NoteArticle> children) {
        this.children = children;
    }

    public Integer getArtSort() {
        return artSort;
    }

    public void setArtSort(Integer artSort) {
        this.artSort = artSort;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pid", getPid())
            .append("noteId", getNoteId())
            .append("artTitle", getArtTitle())
            .append("artContent", getArtContent())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
